(function($, window) {
	/*
	 data:{
	 	title:"",
	 	color:[],
	 	legendData:[],
	 	seriesData:[]
	 }
	 */
	window.createPieChartOption = function(chartDataKey) {
		return function() {
			var data = this[chartDataKey];
			return {
				title: {
					subtext: data.title,
					subtextStyle: {
						color: "#5B5B5B"
					},
					x: 'center',
					y: -25
				},
				legend: {
					orient: 'vertical',
					x: 'left',
					y: 'center',
					data: data.legendData
				},
				color: data.color,
				calculable: false,
				series: [{
					type: 'pie',
					radius: '75%',
					center: ['71%', '50%'],
					itemStyle: {
						normal: {
							borderColor: "#FFF",
							borderWidth: 1,
							labelLine: {
								show: false
							},
							label: {
								position: "inner",
								formatter: function(a, b, c, d) {
									if(a.percent>5){
										return Math.round(a.percent) + "%";
									}else{
										return "";
									}
									
								}
							}
						}
					},
					data: data.seriesData
				}]
			};
		}
	}
})(mui, window);